package com.csun.cmny.provider.dto;

import com.csun.cmny.provider.validator.OmcConvertAddValidator;
import com.csun.cmny.provider.validator.OmcServiceAddValidator;
import com.csun.cmny.provider.validator.OmcServiceEditValidator;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-05-21 11:42
 * @Description: the class service dto
 */
@Data
public class ServiceDto implements Serializable {

    private static final long serialVersionUID = -6471231127383618211L;

    /**
     * 服务Id
     */
    @NotNull(message = "{service.id.null}",
            groups = {OmcServiceEditValidator.class})
    private Long id;

    /**
     * 服务名称
     */
    @NotNull(message = "{service.name.null}",
            groups = {OmcServiceAddValidator.class})
    @NotEmpty(message = "{service.name.null}",
            groups = {OmcServiceAddValidator.class})
    private String serviceName;

    /**
     * 服务内容
     */
    private String serviceContent;

    /**
     * 需使用的积分
     */
    @NotNull(message = "{service.integral.null}",
            groups = {OmcServiceAddValidator.class})
    private Integer integral;

    /**
     * 服务类型 0-按次 1-按小时
     */
    @NotNull(message = "{service.type.null}",
            groups = {OmcServiceAddValidator.class})
    @Range(min = 0, max = 1, message = "{service.type.range}",
            groups = {OmcServiceAddValidator.class})
    private Integer serviceType;

    /**
     * 下单人
     */
    private String orderPut;

    /**
     * 接单人
     */
    private String orderRecv;

    /**
     * 确认订单人
     */
    private String orderConfirm;

    /**
     * 接单超时间隔
     */
    private String durationRecv;

    /**
     * 签到超时间隔
     */
    private String durationIn;

    /**
     * 服务超时间隔
     */
    private String durationService;

    /**
     * 签退超时间隔
     */
    private String durationOut;

    /**
     * 确认超时间隔
     */
    private String durationConfirm;

    /**
     * 备注
     */
    private String remark;

    /*
    * 服务次数
    * */
    private Integer serviceTimes;

    /*\
    * 下单次数
    * */
    private Integer orderTimes;

    /**
     * 组织Id
     */
    private Long groupId;
}
